Field of the Invention
The present invention relates to a control device having a processor and a nonvolatile memory and a data writing method thereof.
Description of the Related Art
If the power supply becomes off while data is being written to a nonvolatile memory in response to a write request from a processor, the data being written is lost and data stored in the nonvolatile memory may also be damaged. For the purpose of preventing such damaging of data, Japanese Laid-Open Patent Publication No. 2011-081659 proposes a storage device, for example.
The storage device of Japanese Laid-Open Patent Publication No. 2011-081659 includes a nonvolatile memory, an access control portion for controlling the nonvolatile memory, and a sending/receiving portion for sending and receiving data to and from a host device. In this storage device, when an abnormality of the power supply to the storage device is detected, the supply of system clock to the sending/receiving portion is stopped so that the storage device halts. This places the storage device in a state where it does not accept a write request from the host device.